import  { ref } from 'vue'
import  { getReceiveOrdersApi } from '@/api'
export function useReceiveOrder() {
    const receiveData = ref([])
    const loading = ref(false)
    function getReceiveData () {
        loading.value = true
        getReceiveOrdersApi().then(res => {
            receiveData.value = res
        }).finally(_ =>{
            loading.value = false
        })
    }

    return {
        getReceiveData,
        receiveData,
        loading
    }
}